package com.yao.mybatis.sqlnode;

import com.yao.mybatis.sqlsource.DynamicContext;

import java.util.List;

/**
 * 所有sqlNode最终都要存储到MixedSqlNode中
 * @author Administrator
 */
public class MixedSqlNode  implements SqlNode{
    private List<SqlNode> sqlNodes;

    public MixedSqlNode(List<SqlNode> sqlNodes) {
        this.sqlNodes = sqlNodes;
    }

    @Override
    public void apply(DynamicContext dynamicContext) {
        for (SqlNode sqlNode : sqlNodes) {
            sqlNode.apply(dynamicContext);
        }

    }
}
